import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import App from './App.vue'
import Login from './components/Login.vue'
import Guestbook from './components/Guestbook.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

const routes = [
  { path: '/login', component: Login },
  { path: '/guestbook', component: Guestbook },
  { path: '/', redirect: '/login' }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

const app = createApp(App)
app.use(router)
app.use(ElementPlus)
app.mount('#app')
